var base_api = 'http://zyapi.denengda.com/manage_system/'
var base_source = 'http://zyapi.denengda.com'

function getSource(compoent, name) {
    $.ajax({
        type: "GET",
        url: base_api + 'media-source/getByName/' + name,
        success: function (response) {
            console.log(response);
            var url = response.data.MediaSource.sourceUrl
            compoent.attr("src", base_source + url)
        }
    });
}

function getGroupMember(compoent) {
    $.ajax({
        type: "GET",
        url: base_api + 'group-member/getMemberList',
        success: function (response) {
            var m_list = response.data.list
            for (i = 0; i < m_list.length; i++) {
                member = m_list[i]
                str =
                "<div class='col'> \
                    <div class='card' style='height:350px'>\
                        <img style='width: 40%;margin: auto;margin-top: 10%;'\
                            src='"+ base_source + member.avatarUrl + "'\
                            class='card-img-top' alt='...'>\
                        <div class='card-body'>\
                            <h5 class='card-title center-card'>"+ member.name + "</h5>\
                            <p class='card-text center-card'>"+ member.jobTitle + "</p>\
                            <p class='card-text'>"+ member.introduce + "</p>\
                        </div>\
                    </div>\
                </div>"
                compoent.append(str);
            }
        }
    });
}
